//-------------------------------------------------------------------
//	Copyright (c) 2010-2012  Zhirnov Andrey
//	This file is part of the "UXGEN" project.
//	See copyright notice in "Engine.h".
//-------------------------------------------------------------------

#ifndef _UX_RENDER_TYPES_H
#define _UX_RENDER_TYPES_H

#include "../Defines/Defines.h"

namespace Engine
{
namespace UXTypes
{

	//
	// Program Data
	//

	struct TProgramData
	{
		const void *	pData;
		usize			uSize;
		///
		TProgramData(): pData(nullptr), uSize(0) {}
		TProgramData(const void *data, usize size): pData(data), uSize(size) {}
		TProgramData(const binary_buffer_t &data): pData(data.ptr()), uSize(data.Size()) {}
		TProgramData(const float_array_t &data): pData(data.ptr()), uSize(data.Size()) {}

		template <typename T>
		TProgramData(const T &data): pData(&data), uSize(sizeof(T)) {}

		bool Valid() const
		{
			return ( pData != nullptr && uSize != 0 );
		}
	};



	//
	// Base Material interface
	//

	class IBaseMaterial
	{
	public:
		virtual void					Apply() = 0;
		virtual e_render_layer::type	GetRenderLayer() const = 0;
	};

//-------------------------------------------------------------------

}	// UXTypes
}	// Engine

#endif	// _UX_RENDER_TYPES_H